package com.example.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

/**
 * @Author 孔德成
 * @Slogan 致敬大师，致敬未来的你
 */
@Data
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    // insert的时候自动填充该属性
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    // insert 和 update 的时候都自动填充该属性
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;

    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;
}
